home *** CD-ROM | disk | FTP | other *** search
/ AmigActive 10 / AACD 10.iso / AACD / Games / MAME / src / drivers / skullxbo.c < prev    next >
C/C++ Source or Header  |  2000-04-23  |  18KB  |  524 lines

  1. /***************************************************************************
  2.  
  3. Skull & Crossbones Memory Map
  4. -----------------------------
  5.  
  6. driver by Aaron Giles
  7.  
  8. SKULL & CROSSBONES 68000 MEMORY MAP
  9.  
  10. Function                           Address        R/W  DATA
  11. -------------------------------------------------------------
  12. Program ROM                        000000-07FFFF  R    D0-D15
  13.  
  14. Switch 1 (Player 1)                FC0000         R    D0-D7
  15. Action                                            R    D5
  16. Step (Development Only)                           R    D4
  17. Joystick Left                                     R    D3
  18. Joystick Right                                    R    D2
  19. Joystick Down                                     R    D1
  20. Joystick Up                                       R    D0
  21.  
  22. Switch 2 (Player 2)                FC2000         R    D0-D7
  23. Action                                            R    D5
  24. Step (Development Only)                           R    D4
  25. Joystick Left                                     R    D3
  26. Joystick Right                                    R    D2
  27. Joystick Down                                     R    D1
  28. Joystick Up                                       R    D0
  29.  
  30. Self-Test (Active Low)             FC4000         R    D7
  31. Vertical Blank                                    R    D6
  32. Audio Busy Flag (Active Low)                      R    D5
  33.  
  34. Audio Receive Port                 FC6000         R    D8-D15
  35.  
  36. EEPROM                             FC8000-FC8FFE  R/W  D0-D7
  37.  
  38. Color RAM                          FCA000-FCAFFE  R/W  D0-D15
  39.  
  40. Unlock EEPROM                      FD0000         W    xx
  41. Sound Processor Reset              FD2000         W    xx
  42. Watchdog reset                     FD4000         W    xx
  43. IRQ Acknowledge                    FD6000         W    xx
  44. Audio Send Port                    FD8000         W    D8-D15
  45.  
  46. Playfield RAM                      FF0000-FF1FFF  R/W  D0-D15
  47. Alpha RAM                          FF2000-FF2FFF  R/W  D0-D15
  48. Motion Object RAM                  FF3000-FF3FFF  R/W  D0-D15
  49. RAM                                FF4000-FFFFFF  R/W
  50.  
  51. ****************************************************************************/
  52.  
  53.  
  54. #include "driver.h"
  55. #include "machine/atarigen.h"
  56. #include "sndhrdw/atarijsa.h"
  57. #include "vidhrdw/generic.h"
  58.  
  59.  
  60. WRITE_HANDLER( skullxbo_playfieldram_w );
  61. WRITE_HANDLER( skullxbo_playfieldlatch_w );
  62. WRITE_HANDLER( skullxbo_hscroll_w );
  63. WRITE_HANDLER( skullxbo_vscroll_w );
  64. WRITE_HANDLER( skullxbo_mobmsb_w );
  65.  
  66. int skullxbo_vh_start(void);
  67. void skullxbo_vh_stop(void);
  68. void skullxbo_vh_screenrefresh(struct osd_bitmap *bitmap, int full_refresh);
  69.  
  70. void skullxbo_scanline_update(int param);
  71.  
  72.  
  73.  
  74.  
  75. /*************************************
  76.  *
  77.  *    Initialization & interrupts
  78.  *
  79.  *************************************/
  80.  
  81. static void update_interrupts(void)
  82. {
  83.     int newstate = 0;
  84.  
  85.     if (atarigen_scanline_int_state)
  86.         newstate = 1;
  87.     if (atarigen_video_int_state)
  88.         newstate = 2;
  89.     if (atarigen_sound_int_state)
  90.         newstate = 4;
  91.  
  92.     if (newstate)
  93.         cpu_set_irq_line(0, newstate, ASSERT_LINE);
  94.     else
  95.         cpu_set_irq_line(0, 7, CLEAR_LINE);
  96. }
  97.  
  98.  
  99. static void irq_gen(int param)
  100. {
  101.     (void)param;
  102.     atarigen_scanline_int_gen();
  103. }
  104.  
  105.  
  106. static void alpha_row_update(int scanline)
  107. {
  108.     UINT16 *check = (UINT16 *)&atarigen_alpharam[((scanline / 8) * 64 + 42) * 2];
  109.  
  110.     /* check for interrupts in the alpha ram */
  111.     /* the interrupt occurs on the HBLANK of the 6th scanline following */
  112.     if ((UINT8 *)check < &atarigen_alpharam[atarigen_alpharam_size] && (*check & 0x8000))
  113.         timer_set(cpu_getscanlineperiod() * 6.9, 0, irq_gen);
  114.  
  115.     /* update the playfield and motion objects */
  116.     skullxbo_scanline_update(scanline);
  117. }
  118.  
  119.  
  120. static void init_machine(void)
  121. {
  122.     atarigen_eeprom_reset();
  123.     atarigen_interrupt_reset(update_interrupts);
  124.     atarigen_scanline_timer_reset(alpha_row_update, 8);
  125.     atarijsa_reset();
  126. }
  127.  
  128.  
  129.  
  130. /*************************************
  131.  *
  132.  *    I/O read dispatch.
  133.  *
  134.  *************************************/
  135.  
  136. static READ_HANDLER( special_port1_r )
  137. {
  138.     int temp = input_port_1_r(offset);
  139.     if (atarigen_cpu_to_sound_ready) temp ^= 0x0040;
  140.     if (atarigen_get_hblank()) temp ^= 0x0010;
  141.     return temp;
  142. }
  143.  
  144.  
  145.  
  146. /*************************************
  147.  *
  148.  *    Who knows what this is?
  149.  *
  150.  *************************************/
  151.  
  152. static WRITE_HANDLER( skullxbo_mobwr_w )
  153. {
  154.     logerror("MOBWR[%02X] = %04X\n", offset, data);
  155. }
  156.  
  157.  
  158.  
  159. /*************************************
  160.  *
  161.  *    Main CPU memory handlers
  162.  *
  163.  *************************************/
  164.  
  165. static struct MemoryReadAddress main_readmem[] =
  166. {
  167.     { 0x000000, 0x07ffff, MRA_ROM },
  168.     { 0xff2000, 0xff2fff, MRA_BANK1 },
  169.     { 0xff5000, 0xff5001, atarigen_sound_r },
  170.     { 0xff5800, 0xff5801, input_port_0_r },
  171.     { 0xff5802, 0xff5803, special_port1_r },
  172.     { 0xff6000, 0xff6fff, atarigen_eeprom_r },
  173.     { 0xff8000, 0xffbfff, MRA_BANK2 },
  174.     { 0xffc000, 0xffcfff, MRA_BANK3 },
  175.     { 0xffd000, 0xffdfff, MRA_BANK4 },
  176.     { 0xffe000, 0xffffff, MRA_BANK5 },
  177.     { -1 }  /* end of table */
  178. };
  179.  
  180.  
  181. static struct MemoryWriteAddress main_writemem[] =
  182. {
  183.     { 0x000000, 0x08ffff, MWA_ROM },
  184.     { 0xff0000, 0xff07ff, skullxbo_mobmsb_w },
  185.     { 0xff0800, 0xff0bff, atarigen_halt_until_hblank_0_w },
  186.     { 0xff0c00, 0xff0fff, atarigen_eeprom_enable_w },
  187.     { 0xff1000, 0xff13ff, atarigen_video_int_ack_w },
  188.     { 0xff1400, 0xff17ff, atarigen_sound_w },
  189.     { 0xff1800, 0xff1bff, atarigen_sound_reset_w },
  190.     { 0xff1c00, 0xff1c7f, skullxbo_playfieldlatch_w },
  191.     { 0xff1c80, 0xff1cff, skullxbo_hscroll_w },
  192.     { 0xff1d00, 0xff1d7f, atarigen_scanline_int_ack_w },
  193.     { 0xff1d80, 0xff1dff, watchdog_reset_w },
  194.     { 0xff1e00, 0xff1e7f, skullxbo_playfieldlatch_w },
  195.     { 0xff1e80, 0xff1eff, skullxbo_hscroll_w },
  196.     { 0xff1f00, 0xff1f7f, atarigen_scanline_int_ack_w },
  197.     { 0xff1f80, 0xff1fff, watchdog_reset_w },
  198.     { 0xff2000, 0xff2fff, atarigen_666_paletteram_w, &paletteram },
  199.     { 0xff4000, 0xff47ff, skullxbo_vscroll_w },
  200.     { 0xff4800, 0xff4fff, skullxbo_mobwr_w },
  201.     { 0xff6000, 0xff6fff, atarigen_eeprom_w, &atarigen_eeprom, &atarigen_eeprom_size },
  202.     { 0xff8000, 0xffbfff, skullxbo_playfieldram_w, &atarigen_playfieldram, &atarigen_playfieldram_size },
  203.     { 0xffc000, 0xffcfff, MWA_BANK3, &atarigen_alpharam, &atarigen_alpharam_size },
  204.     { 0xffd000, 0xffdfff, MWA_BANK4, &atarigen_spriteram, &atarigen_spriteram_size },
  205.     { 0xffe000, 0xffffff, MWA_BANK5 },
  206.     { -1 }  /* end of table */
  207. };
  208.  
  209.  
  210.  
  211. /*************************************
  212.  *
  213.  *    Port definitions
  214.  *
  215.  *************************************/
  216.  
  217. INPUT_PORTS_START( skullxbo )
  218.     PORT_START      /* ff5800 */
  219.     PORT_BIT( 0x00ff, IP_ACTIVE_LOW, IPT_UNUSED )
  220.     PORT_BIT( 0x0100, IP_ACTIVE_LOW, IPT_BUTTON1 | IPF_PLAYER1 )
  221.     PORT_BIT( 0x0200, IP_ACTIVE_LOW, IPT_BUTTON2 | IPF_PLAYER1 )
  222.     PORT_BIT( 0x0400, IP_ACTIVE_LOW, IPT_UNUSED )
  223.     PORT_BIT( 0x0800, IP_ACTIVE_LOW, IPT_UNUSED )
  224.     PORT_BIT( 0x1000, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT | IPF_PLAYER1 )
  225.     PORT_BIT( 0x2000, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT | IPF_PLAYER1 )
  226.     PORT_BIT( 0x4000, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN | IPF_PLAYER1 )
  227.     PORT_BIT( 0x8000, IP_ACTIVE_LOW, IPT_JOYSTICK_UP | IPF_PLAYER1 )
  228.  
  229.     PORT_START      /* ff5802 */
  230.     PORT_BIT( 0x000f, IP_ACTIVE_LOW, IPT_UNUSED )
  231.     PORT_BIT( 0x0010, IP_ACTIVE_HIGH, IPT_UNUSED )    /* HBLANK */
  232.     PORT_BIT( 0x0020, IP_ACTIVE_HIGH, IPT_VBLANK )
  233.     PORT_BIT( 0x0040, IP_ACTIVE_LOW, IPT_UNUSED )    /* /AUDBUSY */
  234.     PORT_SERVICE( 0x0080, IP_ACTIVE_LOW )
  235.     PORT_BIT( 0x0100, IP_ACTIVE_LOW, IPT_BUTTON1 | IPF_PLAYER2 )
  236.     PORT_BIT( 0x0200, IP_ACTIVE_LOW, IPT_BUTTON2 | IPF_PLAYER2 )
  237.     PORT_BIT( 0x0400, IP_ACTIVE_LOW, IPT_UNUSED )
  238.     PORT_BIT( 0x0800, IP_ACTIVE_LOW, IPT_UNUSED )
  239.     PORT_BIT( 0x1000, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT | IPF_PLAYER2 )
  240.     PORT_BIT( 0x2000, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT | IPF_PLAYER2 )
  241.     PORT_BIT( 0x4000, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN | IPF_PLAYER2 )
  242.     PORT_BIT( 0x8000, IP_ACTIVE_LOW, IPT_JOYSTICK_UP | IPF_PLAYER2 )
  243.  
  244.     JSA_II_PORT        /* audio board port */
  245. INPUT_PORTS_END
  246.  
  247.  
  248.  
  249. /*************************************
  250.  *
  251.  *    Graphics definitions
  252.  *
  253.  *************************************/
  254.  
  255. static struct GfxLayout pflayout =
  256. {
  257.     16,8,    /* 8*8 chars */
  258.     20480,    /* 20480 chars */
  259.     4,        /* 4 bits per pixel */
  260.     { 0, 1, 2, 3 },
  261.     { 0x50000*8+0,0x50000*8+0, 0x50000*8+4,0x50000*8+4, 0,0, 4,4,
  262.       0x50000*8+8,0x50000*8+8, 0x50000*8+12,0x50000*8+12, 8,8, 12,12 },
  263.     { 0*8, 2*8, 4*8, 6*8, 8*8, 10*8, 12*8, 14*8 },
  264.     16*8    /* every char takes 16 consecutive bytes */
  265. };
  266.  
  267.  
  268. static struct GfxLayout anlayout =
  269. {
  270.     16,8,    /* 8*8 chars */
  271.     2048,    /* 2048 chars */
  272.     2,        /* 2 bits per pixel */
  273.     { 0, 1 },
  274.     { 0,0, 2,2, 4,4, 6,6, 8,8, 10,10, 12,12, 14,14 },
  275.     { 0*16, 1*16, 2*16, 3*16, 4*16, 5*16, 6*16, 7*16 },
  276.     8*16    /* every char takes 16 consecutive bytes */
  277. };
  278.  
  279.  
  280. static struct GfxLayout molayout =
  281. {
  282.     16,8,    /* 8*8 chars */
  283.     20480,    /* 20480 chars */
  284.     5,        /* 5 bits per pixel */
  285.     { 4*0x50000*8, 3*0x50000*8, 2*0x50000*8, 1*0x50000*8, 0*0x50000*8 },
  286.     { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15 },
  287.     { 0*8, 2*8, 4*8, 6*8, 8*8, 10*8, 12*8, 14*8 },
  288.     16*8    /* every char takes 16 consecutive bytes */
  289. };
  290.  
  291.  
  292. static struct GfxDecodeInfo gfxdecodeinfo[] =
  293. {
  294.     { REGION_GFX1, 0, &molayout, 0x000, 32 },
  295.     { REGION_GFX2, 0, &pflayout, 0x200, 16 },
  296.     { REGION_GFX3, 0, &anlayout, 0x300, 16 },
  297.     { -1 } /* end of array */
  298. };
  299.  
  300.  
  301.  
  302. /*************************************
  303.  *
  304.  *    Machine driver
  305.  *
  306.  *************************************/
  307.  
  308. static struct MachineDriver machine_driver_skullxbo =
  309. {
  310.     /* basic machine hardware */
  311.     {
  312.         {
  313.             CPU_M68000,        /* verified */
  314.             ATARI_CLOCK_14MHz/2,
  315.             main_readmem,main_writemem,0,0,
  316.             atarigen_video_int_gen,1
  317.         },
  318.         JSA_II_CPU
  319.     },
  320.     60, DEFAULT_REAL_60HZ_VBLANK_DURATION,    /* frames per second, vblank duration */
  321.     1,
  322.     init_machine,
  323.  
  324.     /* video hardware */
  325.     42*16, 30*8, { 0*16, 42*16-1, 0*8, 30*8-1 },
  326.     gfxdecodeinfo,
  327.     2048, 2048,
  328.     0,
  329.  
  330.     VIDEO_TYPE_RASTER | VIDEO_MODIFIES_PALETTE | VIDEO_UPDATE_BEFORE_VBLANK |
  331.             VIDEO_PIXEL_ASPECT_RATIO_1_2,
  332.     0,
  333.     skullxbo_vh_start,
  334.     skullxbo_vh_stop,
  335.     skullxbo_vh_screenrefresh,
  336.  
  337.     /* sound hardware */
  338.     JSA_II_MONO(REGION_SOUND1),
  339.  
  340.     atarigen_nvram_handler
  341. };
  342.  
  343.  
  344.  
  345. /*************************************
  346.  *
  347.  *    ROM definition(s)
  348.  *
  349.  *************************************/
  350.  
  351. ROM_START( skullxbo )
  352.     ROM_REGION( 0x80000, REGION_CPU1 )    /* 8*64k for 68000 code */
  353.     ROM_LOAD_EVEN( "5150", 0x00000, 0x10000, 0x9546d88b )
  354.     ROM_LOAD_ODD ( "5151", 0x00000, 0x10000, 0xb9ed8bd4 )
  355.     ROM_LOAD_EVEN( "5152", 0x20000, 0x10000, 0xc07e44fc )
  356.     ROM_LOAD_ODD ( "5153", 0x20000, 0x10000, 0xfef8297f )
  357.     ROM_LOAD_EVEN( "5154", 0x40000, 0x10000, 0xde4101a3 )
  358.     ROM_LOAD_ODD ( "5155", 0x40000, 0x10000, 0x78c0f6ad )
  359.     ROM_LOAD_EVEN( "5156", 0x70000, 0x08000, 0xcde16b55 )
  360.     ROM_LOAD_ODD ( "5157", 0x70000, 0x08000, 0x31c77376 )
  361.  
  362.     ROM_REGION( 0x14000, REGION_CPU2 )    /* 64k for 6502 code */
  363.     ROM_LOAD( "1149",      0x10000, 0x4000, 0x8d730e7a )
  364.     ROM_CONTINUE(          0x04000, 0xc000 )
  365.  
  366.     ROM_REGION( 0x190000, REGION_GFX1 | REGIONFLAG_DISPOSE )
  367.     ROM_LOAD( "1102",     0x000000, 0x10000, 0x90becdfa ) /* MO */
  368.     ROM_LOAD( "1104",     0x010000, 0x10000, 0x33609071 ) /* MO */
  369.     ROM_LOAD( "1106",     0x020000, 0x10000, 0x71962e9f ) /* MO */
  370.     ROM_LOAD( "1101",     0x030000, 0x10000, 0x4d41701e ) /* MO */
  371.     ROM_LOAD( "1103",     0x040000, 0x10000, 0x3011da3b ) /* MO */
  372.  
  373.     ROM_LOAD( "1108",     0x050000, 0x10000, 0x386c7edc ) /* MO */
  374.     ROM_LOAD( "1110",     0x060000, 0x10000, 0xa54d16e6 ) /* MO */
  375.     ROM_LOAD( "1112",     0x070000, 0x10000, 0x669411f6 ) /* MO */
  376.     ROM_LOAD( "1107",     0x080000, 0x10000, 0xcaaeb57a ) /* MO */
  377.     ROM_LOAD( "1109",     0x090000, 0x10000, 0x61cb4e28 ) /* MO */
  378.  
  379.     ROM_LOAD( "1114",     0x0a0000, 0x10000, 0xe340d5a1 ) /* MO */
  380.     ROM_LOAD( "1116",     0x0b0000, 0x10000, 0xf25b8aca ) /* MO */
  381.     ROM_LOAD( "1118",     0x0c0000, 0x10000, 0x8cf73585 ) /* MO */
  382.     ROM_LOAD( "1113",     0x0d0000, 0x10000, 0x899b59af ) /* MO */
  383.     ROM_LOAD( "1115",     0x0e0000, 0x10000, 0xcf4fd19a ) /* MO */
  384.  
  385.     ROM_LOAD( "1120",     0x0f0000, 0x10000, 0xfde7c03d ) /* MO */
  386.     ROM_LOAD( "1122",     0x100000, 0x10000, 0x6ff6a9f2 ) /* MO */
  387.     ROM_LOAD( "1124",     0x110000, 0x10000, 0xf11909f1 ) /* MO */
  388.     ROM_LOAD( "1119",     0x120000, 0x10000, 0x6f8003a1 ) /* MO */
  389.     ROM_LOAD( "1121",     0x130000, 0x10000, 0x8ff0a1ec ) /* MO */
  390.  
  391.     ROM_LOAD( "1125",     0x140000, 0x10000, 0x3aa7c756 ) /* MO */
  392.     ROM_LOAD( "1126",     0x150000, 0x10000, 0xcb82c9aa ) /* MO */
  393.     ROM_LOAD( "1128",     0x160000, 0x10000, 0xdce32863 ) /* MO */
  394.     /* 170000-18ffff empty */
  395.  
  396.     ROM_REGION( 0x0a0000, REGION_GFX2 | REGIONFLAG_DISPOSE )
  397.     ROM_LOAD( "2129",     0x000000, 0x10000, 0x36b1a578 ) /* playfield */
  398.     ROM_LOAD( "2131",     0x010000, 0x10000, 0x7b7c04a1 ) /* playfield */
  399.     ROM_LOAD( "2133",     0x020000, 0x10000, 0xe03fe4d9 ) /* playfield */
  400.     ROM_LOAD( "2135",     0x030000, 0x10000, 0x7d497110 ) /* playfield */
  401.     ROM_LOAD( "2137",     0x040000, 0x10000, 0xf91e7872 ) /* playfield */
  402.     ROM_LOAD( "2130",     0x050000, 0x10000, 0xb25368cc ) /* playfield */
  403.     ROM_LOAD( "2132",     0x060000, 0x10000, 0x112f2d20 ) /* playfield */
  404.     ROM_LOAD( "2134",     0x070000, 0x10000, 0x84884ed6 ) /* playfield */
  405.     ROM_LOAD( "2136",     0x080000, 0x10000, 0xbc028690 ) /* playfield */
  406.     ROM_LOAD( "2138",     0x090000, 0x10000, 0x60cec955 ) /* playfield */
  407.  
  408.     ROM_REGION( 0x008000, REGION_GFX3 | REGIONFLAG_DISPOSE )
  409.     ROM_LOAD( "2141",     0x000000, 0x08000, 0x60d6d6df ) /* alphanumerics */
  410.  
  411.     ROM_REGION( 0x40000, REGION_SOUND1 )    /* 256k for ADPCM samples */
  412.     ROM_LOAD( "1145",      0x00000, 0x10000, 0xd9475d58 )
  413.     ROM_LOAD( "1146",      0x10000, 0x10000, 0x133e6aef )
  414.     ROM_LOAD( "1147",      0x20000, 0x10000, 0xba4d556e )
  415.     ROM_LOAD( "1148",      0x30000, 0x10000, 0xc48df49a )
  416. ROM_END
  417.  
  418.  
  419. ROM_START( skullxb2 )
  420.     ROM_REGION( 0x80000, REGION_CPU1 )    /* 8*64k for 68000 code */
  421.     ROM_LOAD_EVEN( "sku0h.bin", 0x00000, 0x10000, 0x47083d59 )
  422.     ROM_LOAD_ODD ( "sku0l.bin", 0x00000, 0x10000, 0x2c03feaf )
  423.     ROM_LOAD_EVEN( "sku1h.bin", 0x20000, 0x10000, 0xaa0471de )
  424.     ROM_LOAD_ODD ( "sku1l.bin", 0x20000, 0x10000, 0xa65386f9 )
  425.     ROM_LOAD_EVEN( "5154",      0x40000, 0x10000, 0xde4101a3 )
  426.     ROM_LOAD_ODD ( "5155",      0x40000, 0x10000, 0x78c0f6ad )
  427.     ROM_LOAD_EVEN( "5156",      0x70000, 0x08000, 0xcde16b55 )
  428.     ROM_LOAD_ODD ( "5157",      0x70000, 0x08000, 0x31c77376 )
  429.  
  430.     ROM_REGION( 0x14000, REGION_CPU2 )    /* 64k for 6502 code */
  431.     ROM_LOAD( "1149",      0x10000, 0x4000, 0x8d730e7a )
  432.     ROM_CONTINUE(          0x04000, 0xc000 )
  433.  
  434.     ROM_REGION( 0x190000, REGION_GFX1 | REGIONFLAG_DISPOSE )
  435.     ROM_LOAD( "1102",     0x000000, 0x10000, 0x90becdfa ) /* MO */
  436.     ROM_LOAD( "1104",     0x010000, 0x10000, 0x33609071 ) /* MO */
  437.     ROM_LOAD( "1106",     0x020000, 0x10000, 0x71962e9f ) /* MO */
  438.     ROM_LOAD( "1101",     0x030000, 0x10000, 0x4d41701e ) /* MO */
  439.     ROM_LOAD( "1103",     0x040000, 0x10000, 0x3011da3b ) /* MO */
  440.  
  441.     ROM_LOAD( "1108",     0x050000, 0x10000, 0x386c7edc ) /* MO */
  442.     ROM_LOAD( "1110",     0x060000, 0x10000, 0xa54d16e6 ) /* MO */
  443.     ROM_LOAD( "1112",     0x070000, 0x10000, 0x669411f6 ) /* MO */
  444.     ROM_LOAD( "1107",     0x080000, 0x10000, 0xcaaeb57a ) /* MO */
  445.     ROM_LOAD( "1109",     0x090000, 0x10000, 0x61cb4e28 ) /* MO */
  446.  
  447.     ROM_LOAD( "1114",     0x0a0000, 0x10000, 0xe340d5a1 ) /* MO */
  448.     ROM_LOAD( "1116",     0x0b0000, 0x10000, 0xf25b8aca ) /* MO */
  449.     ROM_LOAD( "1118",     0x0c0000, 0x10000, 0x8cf73585 ) /* MO */
  450.     ROM_LOAD( "1113",     0x0d0000, 0x10000, 0x899b59af ) /* MO */
  451.     ROM_LOAD( "1115",     0x0e0000, 0x10000, 0xcf4fd19a ) /* MO */
  452.  
  453.     ROM_LOAD( "1120",     0x0f0000, 0x10000, 0xfde7c03d ) /* MO */
  454.     ROM_LOAD( "1122",     0x100000, 0x10000, 0x6ff6a9f2 ) /* MO */
  455.     ROM_LOAD( "1124",     0x110000, 0x10000, 0xf11909f1 ) /* MO */
  456.     ROM_LOAD( "1119",     0x120000, 0x10000, 0x6f8003a1 ) /* MO */
  457.     ROM_LOAD( "1121",     0x130000, 0x10000, 0x8ff0a1ec ) /* MO */
  458.  
  459.     ROM_LOAD( "1125",     0x140000, 0x10000, 0x3aa7c756 ) /* MO */
  460.     ROM_LOAD( "1126",     0x150000, 0x10000, 0xcb82c9aa ) /* MO */
  461.     ROM_LOAD( "1128",     0x160000, 0x10000, 0xdce32863 ) /* MO */
  462.     /* 170000-18ffff empty */
  463.  
  464.     ROM_REGION( 0x0a0000, REGION_GFX2 | REGIONFLAG_DISPOSE )
  465.     ROM_LOAD( "2129",     0x000000, 0x10000, 0x36b1a578 ) /* playfield */
  466.     ROM_LOAD( "2131",     0x010000, 0x10000, 0x7b7c04a1 ) /* playfield */
  467.     ROM_LOAD( "2133",     0x020000, 0x10000, 0xe03fe4d9 ) /* playfield */
  468.     ROM_LOAD( "2135",     0x030000, 0x10000, 0x7d497110 ) /* playfield */
  469.     ROM_LOAD( "2137",     0x040000, 0x10000, 0xf91e7872 ) /* playfield */
  470.     ROM_LOAD( "2130",     0x050000, 0x10000, 0xb25368cc ) /* playfield */
  471.     ROM_LOAD( "2132",     0x060000, 0x10000, 0x112f2d20 ) /* playfield */
  472.     ROM_LOAD( "2134",     0x070000, 0x10000, 0x84884ed6 ) /* playfield */
  473.     ROM_LOAD( "2136",     0x080000, 0x10000, 0xbc028690 ) /* playfield */
  474.     ROM_LOAD( "2138",     0x090000, 0x10000, 0x60cec955 ) /* playfield */
  475.  
  476.     ROM_REGION( 0x008000, REGION_GFX3 | REGIONFLAG_DISPOSE )
  477.     ROM_LOAD( "2141",     0x000000, 0x08000, 0x60d6d6df ) /* alphanumerics */
  478.  
  479.     ROM_REGION( 0x40000, REGION_SOUND1 )    /* 256k for ADPCM samples */
  480.     ROM_LOAD( "1145",      0x00000, 0x10000, 0xd9475d58 )
  481.     ROM_LOAD( "1146",      0x10000, 0x10000, 0x133e6aef )
  482.     ROM_LOAD( "1147",      0x20000, 0x10000, 0xba4d556e )
  483.     ROM_LOAD( "1148",      0x30000, 0x10000, 0xc48df49a )
  484. ROM_END
  485.  
  486.  
  487.  
  488. /*************************************
  489.  *
  490.  *    ROM decoding
  491.  *
  492.  *************************************/
  493.  
  494. static void rom_decode(void)
  495. {
  496.     int i;
  497.     for (i = 0x170000; i < 0x190000; i++)
  498.         memory_region(REGION_GFX1)[i] = 0;
  499.     for (i = 0; i < memory_region_length(REGION_GFX2); i++)
  500.         memory_region(REGION_GFX2)[i] ^= 0xff;
  501. }
  502.  
  503.  
  504.  
  505. static void init_skullxbo(void)
  506. {
  507.     atarigen_eeprom_default = NULL;
  508.  
  509.     atarijsa_init(1, 2, 1, 0x0080);
  510.  
  511.     /* speed up the 6502 */
  512.     atarigen_init_6502_speedup(1, 0x4159, 0x4171);
  513.  
  514.     /* display messages */
  515.     atarigen_show_sound_message();
  516.  
  517.     rom_decode();
  518. }
  519.  
  520.  
  521.  
  522. GAME( 1989, skullxbo, 0,        skullxbo, skullxbo, skullxbo, ROT0, "Atari Games", "Skull & Crossbones (set 1)" )
  523. GAME( 1989, skullxb2, skullxbo, skullxbo, skullxbo, skullxbo, ROT0, "Atari Games", "Skull & Crossbones (set 2)" )
  524.